import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
    mode:'history',
    routes: [
        {
            path: '/',
            redirect: '/home',
        },
        {
            path: '/home',
            name: 'Home',
            component: resolve => require(['@/components/tabBtm/Home'],resolve)//首页
        },
        {
            path: '/alltype',
            name: 'Alltype',
            component: resolve => require(['@/components/homeVues/Alltype'],resolve)//全部分类
        },
        {
            path: '/learn',
            component: resolve => require(['@/components/tabBtm/Learn'],resolve),//课程学习
            children:[
                {
                    path: '',
                    component: resolve => require(['@/components/LearnVues/Commend'],resolve),//推荐课程
                },{
                    path: 'commend',
                    component: resolve => require(['@/components/LearnVues/Commend'],resolve),//推荐课程
                },{
                    path: 'order',
                    component: resolve => require(['@/components/LearnVues/Order'],resolve),//已购课程
                },{
                    path: 'loginTip',
                    component: resolve => require(['@/components/smallCom/LoginTip'],resolve),//未登录提示页
                },
            ]
        },
        {
            path: '/keyword',
            name: 'Keyword',
            component:  resolve => require(['@/components/LearnVues/Keyword'],resolve),//关键字搜索
        },
        {
            path: '/bagLogout',
            component: resolve => require(['@/components/bagVues/BagLogout'],resolve),//个人中心预览页
        },
        {
            path: '/bag',
            component: resolve => require(['@/components/tabBtm/Bag'],resolve),//个人中心
            children:[
                {
                    path: '',
                    component: resolve => require(['@/components/bagVues/BagIndex'],resolve),//个人中心首页
                },
                {
                    path: 'money',
                    component: resolve => require(['@/components/bagVues/Money'],resolve),//钱包
                },
                {
                    path: 'myFlower',
                    component: resolve => require(['@/components/bagVues/MyFlower'],resolve),//我的花瓣
                },
                {
                    path: 'deposit',
                    component: resolve => require(['@/components/bagVues/Deposit'],resolve),//充值
                },
                {
                    path: 'userInfo',
                    component: resolve => require(['@/components/bagVues/UserInfo'],resolve),//完善资料
                },
                {
                    path: 'upguid',
                    component: resolve => require(['@/components/bagVues/Upguid'],resolve),//上传课程引导页
                },
                {
                    path: 'follow',
                    component: resolve => require(['@/components/bagVues/Follow'],resolve),//关注
                },
                {
                    path: 'fans',
                    component: resolve => require(['@/components/bagVues/Fans'],resolve),//粉丝
                },
                {
                    path: 'mydiscuss',
                    component: resolve => require(['@/components/bagVues/Mydiscuss'],resolve),//我收到的评论
                },
                {
                    path: 'mypraise',
                    component: resolve => require(['@/components/bagVues/Mypraise'],resolve),//我收到的点赞
                },
                {
                    path: 'about',
                    component: resolve => require(['@/components/bagVues/About'],resolve),//关于
                },
                {
                    path: 'help',
                    component: resolve => require(['@/components/bagVues/Help'],resolve),//帮助
                },
                {
                    path: 'waitpay',
                    component: resolve => require(['@/components/bagVues/Waitpay'],resolve),//待结算订单
                },
                {
                    path: 'cash',
                    component: resolve => require(['@/components/bagVues/Cash'],resolve),//提现
                },
                {
                    path: 'addcard',
                    component: resolve => require(['@/components/bagVues/Addcard'],resolve),//添加银行卡
                },
                {
                    path: 'level',
                    name: 'Level',
                    component: resolve => require(['@/components/exam/Level'],resolve),//花艺师等级
                },
                {
                    path: 'testOne',
                    name: 'TestOne',
                    component: resolve => require(['@/components/exam/TestOne'],resolve),//一星测试
                },
                {
                    path: 'testTwo',
                    name: 'TestTwo',
                    component: resolve => require(['@/components/exam/TestTwo'],resolve),//二星测试
                }
            ]
        },
        {
            path: '/login',
            name: 'Login',
            component: resolve => require(['@/components/Login'],resolve),//添加银行卡
        },{
            path: '/sendcode',
            name: 'Sendcode',
            component: resolve => require(['@/components/smallCom/Sendcode'],resolve),//发送验证码
        },
        {
            path: '/reg',
            name: 'Reg',
            component: resolve => require(['@/components/Reg'],resolve),//注册
        },
        {
            path: '/detail',
            name: 'Detail',
            component: resolve => require(['@/components/Detail'],resolve),//详情页
        },
        {
            path: '/detailIos',
            name: 'DetailIos',
            component: resolve => require(['@/components/detailVues/DetailIos'],resolve),//详情页IOS
        },
        {
            path: '/detailOther',
            name: 'DetailOther',
            component: resolve => require(['@/components/detailVues/DetailOther'],resolve),//详情页 安卓 wap
        }
        ,{
            path: '/videoCheck',
            name: 'VideoCheck',
            component: resolve => require(['@/components/detailVues/VideoCheck'],resolve),//视频预览页
        },
        {
            path: '/transfer',
            name: 'Transfer',
            component: resolve => require(['@/components/detailVues/Transfer'],resolve),//课程中转页
        },
        {
            path: '/setPaypwd',
            name: 'SetPaypwd',
            component: resolve => require(['@/components/detailVues/SetPaypwd'],resolve),//设置支付密码
        },
        {
            path: '/florist',
            name: 'Florist',
            component: resolve => require(['@/components/floristVues/Florist'],resolve),//花艺师详情
        },
        {
            path: '/opus',
            name: 'Opus',
            component: resolve => require(['@/components/floristVues/Opus'],resolve),//花艺师作品
        },
        {
            path: '/titList',
            name: 'TitList',
            component: resolve => require(['@/components/TitList'],resolve),//动态标题页
        },
        {
            path: '/special/a',
            name: 'SpecialA',
            component: resolve => require(['@/components/special/a'],resolve),//专题一
        },
        {
            path: '/special/b',
            name: 'SpecialB',
            component: resolve => require(['@/components/special/b'],resolve),//专题二
        },
        {
            path: '/special/c',
            name: 'SpecialC',
            component: resolve => require(['@/components/special/c'],resolve),//专题三
        },
        {
            path: '/special/d',
            name: 'SpecialD',
            component: resolve => require(['@/components/special/d'],resolve),//专题四
        },
        {
            path: '/christmas',
            name: 'Christmas',
            component: resolve => require(['@/components/christmas/Christmas'],resolve),//圣诞活动
        },
        {
            path: '/uploadlist',
            name: 'UploadList',
            component: resolve => require(['@/components/tabBtm/uploadList'],resolve),//圣诞活动
        },
        {
            path: '/othernet/:url',
            name: 'otherNet',
            component: resolve => require(['@/components/smallCom/otherNet'],resolve),//外部地址跳转的页面
        }
    ]
})
